package main

import (
	"fmt"
)

type Person struct{
	Name string 
	Age int 
}
func main(){

	var p1 Person = Person{}
	p1.Name="tom"
	p1.Age=100

	fmt.Println(p1)

	var p2 *Person = new(Person)
	p2.Name="jack"
	(*p2).Name="lucy"
	p2.Age=300
	fmt.Println(p2)
	fmt.Println(*p2)

	p3:=Person{"huahua",222}
	fmt.Println(p3)

	p4:=&p3

	p4.Name="IHI哥哥"
	p4.Age=1000

	fmt.Println(p3,p4)

	var p5 *Person = &Person{"分摊表",888}
	fmt.Println(p5)

	// p5:=[...]int{1,2,3,4}
	// var p6 map[string]int = make(map[string]int,2)
	// p6["age"]=1
	// p6["tom"]=2

	// fmt.Println(p5)
	// fmt.Println(p6)

	// p7:=p5[:]
	// fmt.Println(p7)
	// fmt.Printf("%T,%T\n",p5,p7)


}